import React, { Component } from 'react'
import { Layout } from 'antd';
import { Route, Switch,Redirect } from "react-router-dom"
const { Content } = Layout;


export default class index extends Component {
    render() {
        const { path, component } = this.props.routeInfo
        return (
            <Content
                className="site-layout-background"
                style={{
                    margin: '24px 16px',
                    padding: 24,
                    minHeight: 280,
                    backgroundColor: "white"
                }}
            >
                <Switch>
                    <Route path={path} component={component} />
                    <Redirect to="/home" />
                </Switch>
            </Content>
        )
    }
}
